package com.learn.controller;

import com.learn.feign_service.DeptFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hystrix")
public class HystrixConsumerController {
    @Autowired
    private DeptFeignService deptFeignService;
    
    @PostMapping("/findOneDept")
    public String findOneDept(Integer id) {
        return deptFeignService.findOneDeptHystrix(id);
    }
}
